#include <iostream>
#include <vector>
#include <algorithm>
#include <iterator>
//a[i] the number of coins, c[i] the face value
int backtrack(std::vector<int>& a, int k, int n, const std::vector<int>& c){
	if(k == c.size()-1) {
		a[k] = n;
		std::copy(a.begin(), a.end(), std::ostream_iterator<int>(std::cout , " "));
		std::cout << std::endl;
		return 1;
	}
	else{
		int count = 0;
		for (int i = 0; i*c[k] <= n; ++i){
			a[k] = i;
			count += backtrack(a,k+1,n-i*c[k],c);
		}
		return count;
	}
}

void test_9_8(){
	int c[] = {25, 10, 5, 1};
	int n = sizeof(c)/sizeof(int);
	std::vector<int> cv(c,c+n);
	int sum;
	while(std::cin >>sum){
		std::vector<int> av(n, 0);
		std::cout << backtrack(av,0,sum,cv) <<std::endl;
	}
}